﻿using System;
using System.ComponentModel;

namespace HalconDotNet
{
	// Token: 0x02000014 RID: 20
	[TypeConverter(typeof(HLineStyleWPFConverter))]
	public class HLineStyleWPF
	{
		// Token: 0x17000027 RID: 39
		// (get) Token: 0x060000DE RID: 222 RVA: 0x0000599B File Offset: 0x00003B9B
		// (set) Token: 0x060000DF RID: 223 RVA: 0x000059A3 File Offset: 0x00003BA3
		public int Visible { get; set; }

		// Token: 0x17000028 RID: 40
		// (get) Token: 0x060000E0 RID: 224 RVA: 0x000059AC File Offset: 0x00003BAC
		// (set) Token: 0x060000E1 RID: 225 RVA: 0x000059B4 File Offset: 0x00003BB4
		public int Invisible { get; set; }

		// Token: 0x060000E2 RID: 226 RVA: 0x000059BD File Offset: 0x00003BBD
		public HLineStyleWPF()
		{
		}

		// Token: 0x060000E3 RID: 227 RVA: 0x000059C5 File Offset: 0x00003BC5
		public HLineStyleWPF(int visible, int invisible)
		{
			this.Visible = visible;
			this.Invisible = invisible;
		}

		// Token: 0x060000E4 RID: 228 RVA: 0x000059DC File Offset: 0x00003BDC
		public static HLineStyleWPF Parse(string str)
		{
			if (string.IsNullOrEmpty(str))
			{
				return new HLineStyleWPF();
			}
			string[] array = str.Split(new char[]
			{
				' '
			});
			if (array.Length > 2)
			{
				throw new FormatException(string.Format("Cannot parse '{0}' into a HLineStyleWPF object because it is not in the \"<visible> (<invisible>)\" format.", str));
			}
			if (array.Length == 2)
			{
				return new HLineStyleWPF(int.Parse(array[0].Trim()), int.Parse(array[1].Trim()));
			}
			return new HLineStyleWPF(int.Parse(array[0].Trim()), int.Parse(array[0].Trim()));
		}

		// Token: 0x060000E5 RID: 229 RVA: 0x00005A65 File Offset: 0x00003C65
		public static implicit operator HTuple(HLineStyleWPF ls)
		{
			return new HTuple(new int[]
			{
				ls.Visible,
				ls.Invisible
			});
		}
	}
}
